package com.ai.module.mj.loadbalancer;


import com.ai.common.BaseResp;
import com.ai.module.mj.domain.DiscordAccount;
import com.ai.module.mj.domain.Task;
import com.ai.module.mj.domain.vo.SubmitResultVO;
import com.ai.module.mj.service.DiscordService;

import java.util.List;
import java.util.Map;
import java.util.concurrent.Callable;
import java.util.concurrent.Future;
/**
 * @author: 何晋庆
 * @create: 2023-12-10 12:55
 * @description: 与 mj真正交互逻辑
 **/
public interface DiscordInstance extends DiscordService {

	String getInstanceId();

	DiscordAccount account();

	boolean isAlive();

	void startWss() throws Exception;

	List<Task> getRunningTasks();

	void exitTask(Task task);

	Map<String, Future<?>> getRunningFutures();

	SubmitResultVO submitTask(Task task, Callable<BaseResp<Void>> discordSubmit);

//	@Async
//	void asyncInsert(Task task, UserTaskEntity userTask, String fileName, AliFileVo aliFileVo);
}
